import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/smart-system/multilevelDict/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (dictId) => {
  return request({
    url: '/api/smart-system/multilevelDict/detail',
    method: 'get',
    params: {
      dictId
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/smart-system/multilevelDict/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/smart-system/multilevelDict/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/smart-system/multilevelDict/submit',
    method: 'post',
    data: row
  })
}

export const getMultilevel = (dictType,pcode,level) => {
  return request({
    url: '/api/smart-system/multilevelDict/getMultilevel',
    method: 'get',
    params: {
      dictType,
      pcode,
      level
    }
  })
}



export const getMultilevelMore = (dictType) => {
  return request({
    url: '/api/smart-system/multilevelDict/getMultilevelMore',
    method: 'get',
    params: {
      dictType
    }
  })
}